<?php


namespace app\cms\model;


use app\cms\community\lib\QueryModel;
use think\facade\Db;

class buildModel extends QueryModel
{
    public function __construct(array $data = [], protected $table = '')
    {
        $this->name = $this->table;
        parent::__construct($data);
    }


    // 自定义模型
    public function createTable(string $sql) {
        // 创建表
        Db::connect($this->connection) -> execute($sql);
    }
}
